<template>
  <div>
    <input type="text" @keyup.enter="fn" />
    <hr />
    >
    <input type="text" @keyup.esc="fn1" />
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    fn() {
      console.log("我被点击了");
    },
    fn1() {
      console.log("我被清除");
    },
  },
};
</script>

<style scoped></style>
